<?php
/**
 * Created by .
 * User: luogan
 * Date: 2022/1/20
 */

use think\facade\Route;

Route::get('/', 'v1.Admin/hello');

Route::group('/v1/',function (){
    //管理员模块
    Route::group('admin/',function (){
        //管理员登录
        Route::post('login', 'v1.Admin/login');
        //管理员退出
        Route::post('logout', 'v1.Admin/logout');
        //获取管理员菜单
        Route::post('admin_menu', 'v1.Admin/adminMenu');
        //获取管理员信息
        Route::post('admin_info', 'v1.Admin/adminInfo');
        //管理员列表
        Route::post('list', 'v1.Admin/list');
        //管理员新增
        Route::post('add', 'v1.Admin/add');
        //管理员更新
        Route::post('edit', 'v1.Admin/edit');
        //管理员详情
        Route::post('info', 'v1.Admin/info');
        //管理员删除
        Route::post('del', 'v1.Admin/del');
    });

    //菜单模块
    Route::group('menu/',function (){
        //菜单列表
        Route::post('list', 'v1.Menu/list');
        //菜单新增
        Route::post('add', 'v1.Menu/add');
        //菜单更新
        Route::post('edit', 'v1.Menu/edit');
        //菜单详情
        Route::post('info', 'v1.Menu/info');
        //菜单删除
        Route::post('del', 'v1.Menu/del');
    });


    //角色模块
    Route::group('role/',function (){
        //部门列表
        Route::post('list', 'v1.Role/list');
        //部门新增
        Route::post('add', 'v1.Role/add');
        //部门更新
        Route::post('edit', 'v1.Role/edit');
        //部门详情
        Route::post('info', 'v1.Role/info');
        //部门删除
        Route::post('del', 'v1.Role/del');
    });


    //部门模块
    Route::group('dept/',function (){
        //部门列表
        Route::post('list', 'v1.Dept/list');
        //部门新增
        Route::post('add', 'v1.Dept/add');
        //部门更新
        Route::post('edit', 'v1.Dept/edit');
        //部门详情
        Route::post('info', 'v1.Dept/info');
        //部门删除
        Route::post('del', 'v1.Dept/del');
    });

    //登录日志模块
    Route::group('login_log/',function (){
        //登录日志列表
        Route::post('list', 'v1.AdminLoginLog/list');
        //登录日志详情
        Route::post('info', 'v1.AdminLoginLog/info');

    });

    //操作日志模块
    Route::group('operate_log/',function (){
        //操作日志列表
        Route::post('list', 'v1.AdminLog/list');
        //操作日志详情
        Route::post('info', 'v1.AdminLog/info');
    });
})->middleware('admin');
